package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestWithdraw;
import com.estar.assistsurvy.entity.ResponseMsg;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class WithDrawThread extends BaseThread {

	private RequestWithdraw requestWithdraw;

	public WithDrawThread(Context context, Handler handler, RequestWithdraw requestWithdraw) {
		super(context, handler);
		this.requestWithdraw = requestWithdraw;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.WITHDRAW;
		json=gson.toJson(requestWithdraw);
		postRequest(url_str, json);
		if(result!=null){
			Log.i("wl", "提现返回值"+result);
			ResponseMsg message=new ResponseMsg();
			message=gson.fromJson(result, ResponseMsg.class);
			msg.what=1;
			msg.obj=message;
			msg.sendToTarget();
		}
		
	}
}
